﻿<%@ Page Title="书籍" Language="C#" MasterPageFile="~/mainframe.master" AutoEventWireup="true"
    CodeFile="newbook.aspx.cs" Inherits="newbook" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="css/bassic.css" rel="stylesheet" type="text/css" />
    <link href="css/newbook.css" rel="stylesheet" type="text/css" />
    <link href="layout.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <% 
        DataSetTableAdapters.tb_BookTableAdapter bookTableAdapter = new DataSetTableAdapters.tb_BookTableAdapter();
        DataSet.tb_BookDataTable bookDataTable = new DataSet.tb_BookDataTable();
        bookTableAdapter.Fill(bookDataTable);
    %>
    <div id="subnew">
        新书上架</div>
    <div id="main">
        <div id="left">
        </div>
        <div id="newright">
            <div id="righttop">
                显示： 1-8条， 共<% Response.Write(DataList1.Items.Count.ToString()); %>条</div>
            <div id="newcontent">
                <asp:DataList ID="DataList1" runat="server" DataKeyField="BookID" DataSourceID="ObjectDataSource1">
                    <ItemTemplate>
                        <img alt="" id="newpic1" src='<%# Eval("Picture") %>' style="float: left; margin-top: 20px;margin-left:5px;border:1px solid #f60;" />
                          <div style="float: left; line-height: 20px; margin-left: 15px; clear: right; width:650px;margin-top: 10px;">
                        <h2>
                            <a href='bookshow.aspx?bookID=<%# Eval("BookID") %>'><asp:Label ID="BookNameLabel" runat="server" Text='<%# Eval("BookName") %>' /></a></h2>
                        <br />
                        作者：
                        <asp:Label ID="author" runat="server" Text='<%# Eval("Author") %>' />
                        <br />
                        出版社:
                        <asp:Label ID="PublishLabel" runat="server" Text='<%# Eval("Publish") %>' />
                        <br />
                        出版时间:
                        <asp:Label ID="PublishDateLabel" runat="server" Text='<%# Eval("PublishDate") %>' />
                        <br />
                        简介:
                        <asp:Label ID="summary" runat="server" Text='<%# Eval("Description") %>' />
                        <br />
                        <span class="nowprice">￥<asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price") %>' /></span>
                        <br />
                        <br />
                        </div>
                    </ItemTemplate>
                </asp:DataList>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
                    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
                    TypeName="DataSetTableAdapters.tb_BookTableAdapter" UpdateMethod="Update">
                    <DeleteParameters>
                        <asp:Parameter Name="Original_BookID" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="BookID" Type="Int32" />
                        <asp:Parameter Name="BookName" Type="String" />
                        <asp:Parameter Name="CategoryID" Type="Int32" />
                        <asp:Parameter Name="Author" Type="String" />
                        <asp:Parameter Name="Publish" Type="String" />
                        <asp:Parameter Name="PublishDate" Type="DateTime" />
                        <asp:Parameter Name="Description" Type="String" />
                        <asp:Parameter Name="ISBN" Type="String" />
                        <asp:Parameter Name="BuyInTime" Type="DateTime" />
                        <asp:Parameter Name="TotalNum" Type="Int32" />
                        <asp:Parameter Name="StoreNum" Type="Int32" />
                        <asp:Parameter Name="Price" Type="Decimal" />
                        <asp:Parameter Name="Picture" Type="String" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="BookName" Type="String" />
                        <asp:Parameter Name="CategoryID" Type="Int32" />
                        <asp:Parameter Name="Author" Type="String" />
                        <asp:Parameter Name="Publish" Type="String" />
                        <asp:Parameter Name="PublishDate" Type="DateTime" />
                        <asp:Parameter Name="Description" Type="String" />
                        <asp:Parameter Name="ISBN" Type="String" />
                        <asp:Parameter Name="BuyInTime" Type="DateTime" />
                        <asp:Parameter Name="TotalNum" Type="Int32" />
                        <asp:Parameter Name="StoreNum" Type="Int32" />
                        <asp:Parameter Name="Price" Type="Decimal" />
                        <asp:Parameter Name="Picture" Type="String" />
                        <asp:Parameter Name="Original_BookID" Type="Int32" />
                    </UpdateParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
    </div>
</asp:Content>
